package com.qunar.wan.common_api.model.enums;

/**
 * User: huiming.suo Date: 13-12-3 Time: 上午10:13 活动评价状态
 */
public enum EvaluateStatus {

    NOT(0, "未评价"), BETTER(3, "很好"), GOOD(2, "还行"), BAD(1, "差");

    private String mean;
    private int code;

    private EvaluateStatus(int code, String mean) {
        this.code = code;
        this.mean = mean;
    }

    public String getMean() {
        return mean;
    }

    public int getCode() {
        return code;
    }

    public int code() {
        return this.code;
    }

    public static EvaluateStatus codeOf(int code) {
        for (EvaluateStatus evaluateStatus : values()) {
            if (evaluateStatus.code == code) {
                return evaluateStatus;
            }
        }
        throw new IllegalArgumentException("Invalid role code: " + code);
    }
}
